package com.gopay.solution.manager;

import java.util.List;

import com.gopay.solution.domain.po.SolutionRuleDtl;
import com.gopay.solution.domain.po.SsAcctSolutionRel;
import com.gopay.solution.domain.vo.Solution;

/**
 * 账户与方案关系
 * @SsApSolutionRelManager.java
 * @author liujy
 * @2013-4-7 下午2:08:39  www.gopay.com.cn Inc.All rights reserved.
 */
public interface SsAcctSolutionManager {
    

    /**
     * 查询账户特定方案关系
     * @param acctProdCode
     * @param solutionType
     * @return
     */
    SsAcctSolutionRel findRelByAcctId(String acctId, String solutionType);
    
    /**
     * 查询账户特定方案的方案明细
     * @param solutionId
     * @param solutionType
     * @return
     */
    List<SolutionRuleDtl> findDtlsByAcctIdAndIntTxnCd(String solutionId, String solutionType);
    
    /**
     * 查询账户特定方案的特定交易码下的方案明细
     * @param solutionId
     * @param solutionType
     * @param gopayIntTxnCd
     * @return
     */
    List<SolutionRuleDtl> findDtlsByAcctIdAndIntTxnCd(String solutionId, String intTxnCd, String solutionType);
    
    
    
    
    
    
    
    SsAcctSolutionRel saveRelAndChild(SsAcctSolutionRel rel, Solution s);
    
    Solution saveApSolitionAndChild(Solution s, String solutionType);
    
    
    
    
    void deleteRelAndChild(SsAcctSolutionRel rel, String solutionType);

    //update by wangdong 20160906 增加账户类型，账号，缓存用
    void deleteRelAndChild(SsAcctSolutionRel rel, String intTxnCd, String solutionType,String prodCode, String acctId);
    
    void updateSolutionChild(Solution s, String solutionType);
    //update by wangdong 20160905 增加账户类型，账号，缓存用
    void updateSolutionChild(Solution s, String intTxnCd, String solutionType,String prodCode, String acctId,String payChannel);
    
    
    Solution load(long solutionId, String solutionType);
    Solution load(long solutionId, String intTxnCd, String solutionType);
}
